﻿//
// Created: 2018/8/28
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.WXshopBuiness;

namespace Model.WXshopBuiness.Map
{
    internal  class ProductContentsMap:EntityTypeConfiguration< ProductContents >    
    {
        public ProductContentsMap()
        {
             this.ToTable("ProductContents");
             this.HasKey(i => new { i.ID });
             this.Property(i => i.ID).HasColumnName("ID");                     
             this.Property(i => i.ProductID).HasColumnName("ProductID");                     
             this.Property(i => i.ProductContent).HasColumnName("ProductContent");                     
             this.Property(i => i.ProductImage).HasColumnName("ProductImage");
            this.Property(i => i.Domain).HasColumnName("Domain");            
             this.Property(i => i.ProductIndex).HasColumnName("ProductIndex");
            this.Property(i => i.ProductContentID).HasColumnName("ProductContentID");
            this.Property(i => i.Type).HasColumnName("Type");
        }   
    }
    
     public static class ProductContentsMapExtensions
    {
        public static void UserProductContentsMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new ProductContentsMap());
        }
    }
}